import com.prct.FlyBehaviour;
		
import com.prct.QuackBehaviour;

import com.prct.Duck;

public class checkfly extends Duck
{

	public checkfly() throws ClassNotFoundException,InstantiationException,IllegalAccessException
	{
		Class obj= Class.forName("com.prct.FlyWithWings");

		fb=(FlyBehaviour)obj.newInstance();

		obj= Class.forName("com.prct.QuackSound");
		
		qb=(QuackBehaviour)obj.newInstance();
	}
	public static void main(String... a) throws ClassNotFoundException,InstantiationException,IllegalAccessException
	{

		
		Duck check =new checkfly();
		check.performFly();
		check.performQuack();		
		check.swim();	


	}
	public void display()
	{
		swim();
	}
}